package com.atguigu.gmall.product.service.impl;

import java.util.LinkedList;

public class Test1 {
    //    public static void main(String[] args) {
//        String s = "ajdkglj";
//        String s1 = new StringBuilder(s).reverse().toString();
//        System.out.println("s1 = " + s1);
//    }
//    public static void main(String[] args) {
//        int a = 5;
//        System.out.println("Value is-" + ((a<5)?9.9:9));
//    }
    /*public static void main(String[] args) {
        int i = 9;
        int j = 1;
        while (i>=1){
            j=(j+1)*2;
            i--;
        }
        System.out.println(j);
    }*/
    public static void main(String[] args) {
        LinkedList linkedList = new LinkedList();
        linkedList.add(1);
        linkedList.add(2);
        linkedList.add(3);
        linkedList.add(4);
        linkedList.add(5);
        int length = 0;
        while (linkedList!=null){
            length++;

        }
        System.out.println(length);
    }
}
